module Base
{
	model Liaz300Truck_Base
	{
		mesh = vehicles/B42LIAZ300TRUCK_Body|Body,
		shader = vehicle_norandom_multiuv,
		invertX = FALSE,
		scale = 1,
	}
	model Liaz300Truck_Interior
	{
		mesh = vehicles/B42LIAZ300TRUCK_Body|LiazInterior,
		texture = Vehicles/LiazSemi_Interior,
		shader = basicEffect,
		scale = 1,
	}
	model Liaz300Truckfrontwheelleft
	{
		mesh = vehicles/B42LIAZ300TRUCK_Body|LiazWheel,
		texture = vehicles/Liaz300Fronttires,
		shader = basicEffect,
                invertX = TRUE,
	}
	model Liaz300Truckfrontwheelright
	{
		mesh = vehicles/B42LIAZ300TRUCK_Body|LiazWheel,
		texture = vehicles/Liaz300Fronttires,
		shader = basicEffect,
                invertX = TRUE,
	}
	model Liaz300Truckbackwheelleft
	{
		mesh = vehicles/B42LIAZ300TRUCK_Body|LiazWheelRear,
		texture = vehicles/Liaz300Reartires,
		shader = basicEffect,
	}
	model Liaz300Truckbackwheelright
	{
		mesh = vehicles/B42LIAZ300TRUCK_Body|LiazWheelRear,
		texture = vehicles/Liaz300Reartires,
		shader = basicEffect,
	}
	model Liaz300Truck_Battery
    {
        mesh = vehicles/B42LIAZ300TRUCK_Body|LiazBattery,
		texture = vehicles/LiazSemi_Interior,
        shader = basicEffect,
        scale = 1,
    }
	vehicle Liaz300Truck
    {
        mechanicType = 2,
        offRoadEfficiency = 1.0,
        engineRepairLevel = 4,
        playerDamageProtection = 1.5,
        engineRPMType = van,

        model
        {
            file = Liaz300Truck_Base,
            scale = 0.9400,
            offset = 0.0000 0.6596 -0.1277,
        }

        part TCLConfig
        {
            category = nodisplay,

            table TCLConfig
            {
                airbrake = true,
                animType = vanilla,
            }
        }

        spawnOffsetY = 0,

        skin
        {
            texture = Vehicles/LiazTRUCK_White,
        }

        skin
        {
            texture = Vehicles/LiazTRUCK_Blue,
        }

        skin
        {
            texture = Vehicles/LiazTRUCK_Green,
        }

        skin
        {
            texture = Vehicles/LiazTRUCK_Orange,
        }

        skin
        {
            texture = Vehicles/LiazTRUCK_Red,
        }

        skin
        {
            texture = Vehicles/LiazTRUCK_Purple,
        }

        skin
        {
            texture = Vehicles/LiazTRUCK_Yellow,
        }

        skin
        {
            texture = Vehicles/LiazTRUCK_WhiteBlueStripes,
        }

        skin
        {
            texture = Vehicles/LiazTRUCK_WhiteRedStripes,
        }

        skin
        {
            texture = Vehicles/LiazTRUCK_WhiteGreenStripes,
        }

        textureRust = Vehicles/LiazTRUCKRust,
        textureMask = Vehicles/LiazSpecialServiceMask,
        textureLights = Vehicles/LiazSemiSpecialServiceLights,
        textureDamage1Shell = Vehicles/LiazSemiDamage1,
        textureDamage2Shell = Vehicles/LiazSemiDamage2,
        textureDamage1Overlay = Vehicles/LiazSemiBlood,
        textureDamage2Overlay = Vehicles/LiazSemiBlood,

        sound
        {
            engine = VehicleEngineSUV,
            engineStart = VehicleEngineSUV,
            engineTurnOff = VehicleEngineSUV,
            horn = VehicleHornVan,
            ignitionFail = VehicleIgnitionFailSUV,
        }

        extents = 2.5319 1.4894 7.5106,
        mass = 750,
        physicsChassisShape = 2.5106 1.4894 7.5106,
        centerOfMassOffset = -0.0106 0.8298 -0.0532,
        shadowExtents = 2.5355 8.3119,
        shadowOffset = -0.0078 -0.1843,
        engineForce = 5150,
        maxSpeed = 65f,
        gearRatioCount = 4,
        engineLoudness = 120,
        engineQuality = 70,
        brakingForce = 50,
        stoppingMovementForce = 4.0f,
        rollInfluence = 0.65f,
        steeringIncrement = 0.04,
        steeringClamp = 0.25,
        suspensionStiffness = 45,
        suspensionCompression = 4.70,
        suspensionDamping = 3.75,
        maxSuspensionTravelCm = 14,
        suspensionRestLength = 0.15f,
        wheelFriction = 2.0f,
        frontEndHealth = 2250,
        rearEndHealth = 2200,
        seats = 2,

        wheel FrontLeft
        {
            front = true,
            offset = 1.0638 -0.6702 2.4894,
            radius = 0.55f,
            width = 0.3f,
        }

        wheel FrontRight
        {
            front = true,
            offset = -1.0638 -0.6702 2.4894,
            radius = 0.55f,
            width = 0.3f,
        }

        wheel RearLeft
        {
            front = false,
            offset = 0.8830 -0.6702 -2.1064,
            radius = 0.55f,
            width = 0.3f,
        }

        wheel RearRight
        {
            front = false,
            offset = -0.8830 -0.6702 -2.1064,
            radius = 0.55f,
            width = 0.3f,
        }

        template = PassengerSeat2,

        passenger FrontLeft
        {
            showPassenger = true,
            hasRoof = true,
            door = DoorFrontLeft,

            position inside
            {
                offset = 0.7234 0.5426 2.9255,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = 1.4362 -1.0213 3.0532,
                rotate = 0.0000 0.0000 0.0000,
                area = SeatFrontLeft,
            }
        }

        passenger FrontRight
        {
            showPassenger = true,
            hasRoof = true,
            door = DoorFrontRight,

            position inside
            {
                offset = -0.6809 0.5426 2.9255,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = -1.5745 -1.0213 3.0532,
                rotate = 0.0000 0.0000 0.0000,
                area = SeatFrontRight,
            }
        }

        area Engine
        {
            xywh = 1.5532 2.1170 0.5745 0.7021,
        }

        area TruckBed
        {
            xywh = -0.0106 -4.1383 2.5319 0.9362,
        }

        area SeatFrontLeft
        {
            xywh = 1.6702 3.1383 0.8085 1.0000,
        }

        area SeatFrontRight
        {
            xywh = -1.6702 3.1277 0.8085 1.0000,
        }

        area GasTank
        {
            xywh = -1.5106 1.7766 0.4894 0.4894,
        }

        area TireFrontLeft
        {
            xywh = 1.5106 3.3085 0.4894 0.4894,
        }

        area TireFrontRight
        {
            xywh = -1.5106 3.3298 0.4894 0.4894,
        }

        area TireRearLeft
        {
            xywh = 1.5106 -1.2447 0.4894 0.4894,
        }

        area TireRearRight
        {
            xywh = -1.5106 -1.2447 0.4894 0.4894,
        }

        part Seat*
        {
            table install
            {
                skills = Mechanics:2,
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                skills = Mechanics:2,
                recipes = Intermediate Mechanics,
            }
        }

        part GloveBox
        {
            model Liaz300Truck
            {
                file = Liaz300Truck_Interior,
                offset = 0.0000 0.0000 0.0000,
                rotate = 0.0000 0.0000 0.0000,
            }

            area = SeatFrontRight,
            itemType = Base.GloveBox,
            mechanicRequireKey = true,

            container
            {
                capacity = 15,
                test = Vehicles.ContainerAccess.GloveBox,
            }

            lua
            {
                create = Vehicles.Create.Default,
            }
        }

        template = GasTank,

        part GasTank
        {
            area = GasTank,
            category = gastank,
            mechanicRequireKey = true,

            container
            {
                capacity = 100,
                test = Vehicles.ContainerAccess.GasTank,
                contentType = Gasoline,
                conditionAffectsCapacity = false,
            }

            lua
            {
                create = Vehicles.Create.GasTank,
                update = Vehicles.Update.GasTank,
                checkEngine = Vehicles.CheckEngine.GasTank,
            }

            install
            {
                recipes = Intermediate Mechanics,
            }

            uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }

        template = Battery,

        part Battery
        {
            model LiazBatt
            {
                file = Liaz300Truck_Battery,
                offset = 0.0000 0.0000 0.0000,
                rotate = 0.0000 0.0000 0.0000,
            }
        }

        template = Engine,
        template! = Liaz300Truck_accesories,
        template! = Liaz300Truck_seats,
        template! = Liaz300Truck_doors,
        template! = B42Liaz300Truck_windows,
        template! = Liaz300Truck_trunkdoor,
        template! = Liaz300Truck_trunks,
        template! = Liaz300Truck_TruckbedRoof,
        template! = Liaz300Truck_windshields,
        template! = Liaz300Truck_armor,
        template! = Liaz300Truck_bumpers,
        template = Muffler,

        part Muffler
        {
            table install
            {
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }

        template = EngineDoor,

        part EngineDoor
        {
            table install
            {
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }

        part Heater
        {
            category = engine,

            lua
            {
                update = Vehicles.Update.Heater,
            }
        }

        part PassengerCompartment
        {
            category = nodisplay,

            lua
            {
                update = Vehicles.Update.PassengerCompartment,
            }
        }

        part Windshield*
        {
            table install
            {
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }

        template = Tire,

        part TireFrontLeft
        {
            model InflatedTirePlusWheel
            {
                file = Liaz300Truckfrontwheelleft,
                offset = 0.0000 0.0000 0.0000,
                rotate = 0.0000 0.0000 0.0000,
            }
        }

        part TireFrontRight
        {
            model InflatedTirePlusWheel
            {
                file = Liaz300Truckfrontwheelright,
                offset = 0.0000 0.0000 0.0000,
                rotate = 0.0000 0.0000 0.0000,
            }
        }

        part TireRearLeft
        {
            model InflatedTirePlusWheel
            {
                file = Liaz300Truckbackwheelleft,
                offset = 0.0000 0.0000 0.0000,
                rotate = 0.0000 0.0000 0.0000,
            }
        }

        part TireRearRight
        {
            model InflatedTirePlusWheel
            {
                file = Liaz300Truckbackwheelright,
                offset = 0.0000 0.0000 0.0000,
                rotate = 0.0000 0.0000 0.0000,
            }
        }

        template = Brake,

        part Brake*
        {
            table install
            {
                skills = Mechanics:6,
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                skills = Mechanics:6,
                recipes = Intermediate Mechanics,
            }
        }

        template = Suspension,

        part Suspension*
        {
            table install
            {
                skills = Mechanics:6,
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                skills = Mechanics:6,
                recipes = Intermediate Mechanics,
            }
        }

        template = TV,
        template = Counters/part/CounterFrontRight,
        template = Fridges/part/FridgeFrontRight,
        template = Radio,
        template = Headlight,

        physics box
        {
            offset = 0.0000 1.3723 2.7842,
            extents = 2.3511 2.0213 1.9468,
            rotate = 0.0000 0.0000 0.0000,
        }

        physics box
        {
            offset = 0.0000 0.0213 0.0366,
            extents = 1.0638 0.7021 7.4468,
            rotate = 0.0000 0.0000 0.0000,
        }

        attachment trailer
        {
            offset = -0.0213 -0.3443 -3.7157,
            rotate = 0.0000 0.0000 0.0000,
        }

        attachment trailerfront
        {
            offset = 0.0000 -0.4347 4.0284,
            rotate = 0.0000 0.0000 0.0000,
            updateconstraint = false,
        }
    }
}
